From d434a9103c0fe2606b8aeeb1c629db9e9d1adbe6 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 27 Feb 2013 17:18:28 -0500 Subject: [PATCH] range: don't draw origin when the slider is invisible When the range of the GtkRange is zero (i.e. the upper and lower bounds of the adjustment have the same value), don't use an origin to draw the trough, as the slider will also be hidden, and the juncture between the two sections of the trough will be visible. --- gtk/gtkrange.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index d627566aea..8339e52b70 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -2117,7 +2117,7 @@ gtk_range_draw (GtkWidget *widget, if (draw_trough) { - if (!priv->has_origin) + if (!priv->has_origin || !draw_slider) { gtk_render_background (context, cr, x, y, width, height); -- 2.30.2